} pseudo_classes[] = {
{ "first-child", GTK_REGION_FIRST, 0 },
{ "last-child", GTK_REGION_LAST, 0 },
+ { "only-child", GTK_REGION_ONLY, 0 },
{ "sorted", GTK_REGION_SORTED, 0 },
{ "active", 0, GTK_STATE_FLAG_ACTIVE },
{ "prelight", 0, GTK_STATE_FLAG_PRELIGHT },
"nth-child(odd)",
"first-child",
"last-child",
+ "only-child",
"sorted"
};
guint i;
flags |= GTK_REGION_FIRST;
if (sibling_id + 1 == n_siblings)
flags |= GTK_REGION_LAST;
+ if (n_siblings == 1)
+ flags |= GTK_REGION_ONLY;
return flags;
}
* @GTK_REGION_ODD: Region has an odd number within a set.
* @GTK_REGION_FIRST: Region is the first one within a set.
* @GTK_REGION_LAST: Region is the last one within a set.
+ * @GTK_REGION_ONLY: Region is the only one within a set.
* @GTK_REGION_SORTED: Region is part of a sorted area.
*
* Describes a region within a widget.
GTK_REGION_ODD = 1 << 1,
GTK_REGION_FIRST = 1 << 2,
GTK_REGION_LAST = 1 << 3,
+ GTK_REGION_ONLY = 1 << 4,
GTK_REGION_SORTED = 1 << 5
} GtkRegionFlags;
"odd",
"first",
"last",
+ "only",
"sorted"
};